public class J02ArrayErr {
    public static void main(String[] args) {
        int[] arr = {1,3};
        System.out.println(arr[0]);
        //索引超出范围
//        System.out.println(arr[1000]);
        System.out.println(arr[1]);

        // null，引用数据类型的默认值
        int[] arr2 = null;
        System.out.println("arr2 = " + arr2);//null
        int[] arr3;//
//        System.out.println("arr3 = " + arr3);

        String[] arr4 = new String[5];//{null,null...}
        System.out.println("arr4[0] = " + arr4[0]);

        if(arr4[0]==null){
            //true
            System.out.println("arr4[0]的值是null");
        }
        arr4[0] = "34";

        arr4 = null;
        //地址，还叫指针
        System.out.println("arr4 = " + arr4);//null
        System.out.println(arr4[0]);
    }
}
